<template>
  <div>
    <Header></Header>
    <router-view></router-view>
    <Footer v-if="$route.meta.show"></Footer>
  </div>
</template>

<script>
import Header from '@/components/Header';
import Footer from '@/components/Footer';

export default {
  name: 'App',
  components: {
    Header,
    Footer,
  },
  mounted() {
    //通知对象发请求 获取数据 存储vuex(因为home search都用到 所以在入口文件中派发action)
    this.$store.dispatch('categoryList');
  },
};
</script>

<style></style>
